﻿Imports log4net.Config
Imports System.Timers

Namespace My

    ' The following events are available for MyApplication:
    ' 
    ' Startup: Raised when the application starts, before the startup form is created.
    ' Shutdown: Raised after all application forms are closed.  This event is not raised if the application terminates abnormally.
    ' UnhandledException: Raised if the application encounters an unhandled exception.
    ' StartupNextInstance: Raised when launching a single-instance application and the application is already active. 
    ' NetworkAvailabilityChanged: Raised when the network connection is connected or disconnected.
    Partial Friend Class MyApplication

        Private Const APPLICATION_PARAM_NOSPLASH As String = "-nosplash"
        'Private Const APPLICATION_PARAM_WELLCOME_ON As String = "+wellcome"
        'Private Const APPLICATION_PARAM_WELLCOME_OFF As String = "-wellcome"

        Protected Overrides Function OnStartup(ByVal eventArgs As Microsoft.VisualBasic.ApplicationServices.StartupEventArgs) As Boolean

            '' INTERPRETADOR DE ARGUMENTOS
            'If eventArgs.CommandLine.Count >= 1 Then
            '    If eventArgs.CommandLine.Contains(APPLICATION_PARAM_NOSPLASH) Then
            '        My.Application.HideSplashScreen()
            '        Itasoft.ACE.Business.SessionContext.LoadSessionManager()
            '        'Else
            '        '    For i As Integer = 0 To 100
            '        '        My.Application.DoEvents()
            '        '        System.Threading.Thread.Sleep(50)   '30
            '        '        'CType(Me.SplashScreen, FrmSplash).pgbProgresso.Value = i
            '        '    Next
            '    End If
            'End If
            Core.InitConfiguration.InitConfiguration.Run()
            Return MyBase.OnStartup(eventArgs)
        End Function

        Protected Overrides Sub OnRun()
            'System.Threading.Thread.CurrentThread.CurrentUICulture = New System.Globalization.CultureInfo("en-US")
            'System.Threading.Thread.CurrentThread.CurrentCulture = New System.Globalization.CultureInfo("en-US")

            MyBase.OnRun()
        End Sub

    End Class


End Namespace